<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>Kaishengit Todo</title>
	<link rel="stylesheet" href="<%=basePath %>css/bootstrap.min.css">
	<link rel="stylesheet" href="<%=basePath %>css/font-awesome.css">
	<style type="text/css">
		body{
			padding-top: 120px;
		}
		.well{
			width: 400px;
			border-radius: 0px 0px 5px 5px;
			margin: 0px auto;
			padding:0px;
			border:none;
		}
		.well .box_head{
			background-color: #000;
			font-size: 18px;
			color: #FFF;
			padding:10px 17px;

		}
	</style>
</head>
<body>
	<div id="login-container">
	
	<s:actionerror/>
	
	<div id="login-header">
		<h3>Kaishengit Todo</h3>
	</div>
	
	<div id="login-content" class="clearfix">
	
	<form action="<%=basePath%>login.action" method="post">
		
			<c:if test="${not empty param.code and param.code == '10001' }">
				<div class="alert alert-error">
					<button class="close" data-dismiss="alert">×</button>用户名或密码错误
				</div>
			</c:if>
				<fieldset>
					<div class="control-group">
						<label class="control-label" for="username">账号</label>
						<div class="controls">
							<input type="text" class="" id="username" name="user.username">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="password">密码</label>
						<div class="controls">
							<input type="password" class="" id="password" name="user.password">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="password">验证码</label>
						<div class="controls">
							<input type="text" class="" id="password" name="captcha">
							<img id="mycaptcha" src="<%=basePath%>/jcaptcha.jpg">
							<a href="javascript:;" id="changeImg">换一张</a>
						</div>
					</div>
				</fieldset>
				<div class="pull-right">
					<button type="submit" class="btn btn-warning btn-large">
						进入系统
					</button>
				</div>
			</form>
			
		</div>
	
</div>
	<script src="<%=basePath %>js/jquery.js" type="text/javascript"></script>
    <script src="<%=basePath %>js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    	$(document).ready(function(){
    		
    		$("#changeImg").click(function(){
    			$("#mycaptcha").attr("src","<%=basePath%>/jcaptcha.jpg?t="+new Date().getTime());
    			
    		});
    		
    		
    	});
    </script>
</body>
</html>